kTextEncodingKOI8_R = $0A02; { Russian internet standard }
{ TextEncodingVariant type & values }
TYPE
TextEncodingVariant = UInt32;
CONST
{ Default TextEncodingVariant, for any TextEncodingBase }
kTextEncodingDefaultVariant = 0; { Variants of kTextEncodingMacJapanese }
kJapaneseStandardVariant = 0;
kJapaneseStdNoVerticalsVariant = 1;
kJapaneseBasicVariant = 2;
kJapanesePostScriptScrnVariant = 3;
kJapanesePostScriptPrintVariant = 4;
kJapaneseVertAtKuPlusTenVariant = 5; { Variants of kTextEncodingMacHebrew }
kHebrewStandardVariant = 0;
kHebrewFigureSpaceVariant = 1; { Variants of kTextEncodingUnicodeV1_1 }
kUnicodeNoSubset = 0;
kUnicodeNoCompatibilityVariant = 1;
kUnicodeMaxDecomposedVariant = 2;
kUnicodeNoComposedVariant = 3;
{ TextEncodingFormat type & values }
TYPE
TextEncodingFormat = UInt32;
CONST
{ Default TextEncodingFormat for Any TextEncodingBase }
kTextEncodingDefaultFormat = 0; { Formats for kTextEncodingUnicodeV1_1 }
kUnicode16BitFormat = 0;
kUnicodeUTF7Format = 1;
kUnicodeUTF8Format = 2; { Formats for kTextEncodingISO10646_1993 }
kISO10646UCS2Format = 0;
{ TextEncoding type }
TYPE
TextEncoding = UInt32;
{ enums for TextEncoding Conversion routines }
CONST
kTextScriptDontCare = -128;
kTextLanguageDontCare = -128;
kTextRegionDontCare = -128;
{ Character Group and Class }
TYPE
CharacterGroup = UInt8;
CONST
kCharGroupAny = 0; { wildcard }
kCharGroupControl = 1;
kCharGroupCommon = 2;
kCharGroupRomanNumeral = 4;
kCharGroupLatin = 8;
kCharGroupGreek = 9;
kCharGroupCyrillic = 10;
kCharGroupArmenian = 11;
kCharGroupHebrew = 12;
kCharGroupArabic = 13;
kCharGroupIndicCommon = 14;
kCharGroupDevanagari = 15;
kCharGroupBengali = 16;
kCharGroupGurmukhi = 17;
kCharGroupGujarati = 18;
kCharGroupOriya = 19;
kCharGroupTamil = 20;
kCharGroupTelugu = 21;
kCharGroupKannada = 22;
kCharGroupMalayalam = 23;
kCharGroupSinhala = 24;
kCharGroupThai = 25;
kCharGroupLao = 26;
kCharGroupBurmese = 27;
kCharGroupKhmer = 28;
kCharGroupTibetan = 29;
kCharGroupMongolian = 30;
kCharGroupGeorgian = 31;
kCharGroupEthiopic = 32;
kCharGroupCJKCommon = 48;
kCharGroupJapaneseCommon = 49;
kCharGroupKanaCommon = 50;
kCharGroupHiragana = 51;
kCharGroupKatakana = 52;
kCharGroupBopomofo = 53;
kCharGroupJamoHangul = 54;
kCharGroupCJKIdeograph = 55;
kCharGroupUserDefined = 62;
TYPE
CharacterSubgroup = UInt8;
CharacterClass = UInt8;
CONST
kCharClassAny = 0; { wildcard }
kCharClassLetter = 1;
kCharClassNumber = 2;
kCharClassSeparator = 3;
kCharClassPunctuation = 4;
kCharClassSymbol = 5;
kCharClassControl = 6;
kCharClassUndefined = 7;
TYPE
CharacterSubclass = UInt8;
{ subclass wildcard for all classes }
CONST
kCharSubclassAny = 0;
{ subclasses for class letter }
kCharSubclassLetterBasic = 1;
kCharSubclassLetterModifier = 2;
kCharSubclassLetterCombining = 3;
kCharSubclassLetterWordAbbrev = 4;
{ subclasses for class number }
kCharSubclassNumberBasic = 1;
kCharSubclassNumberFraction = 2;
{ subclasses for class separator }
kCharSubclassSeparatorSpace = 1;
kCharSubclassSeparatorNoBreak = 2;
kCharSubclassSeparatorTab = 3;
kCharSubclassSeparatorLineBreak = 4;
{ subclasses for class symbol }
kCharSubclassSymbolOther = 1;
kCharSubclassSymbolMath = 2;
kCharSubclassSymbolCurrency = 3;
kCharSubclassSymbolCombining = 4;
TYPE
CharacterSubclassMask = UInt16;
CONST
kCharLetterBasicMask = $02;
kCharLetterModifierMask = $04;
kCharLetterCombiningMask = $08;
kCharLetterWordAbbrevMask = $10;
kCharNumberBasicMask = $02;
kCharNumberFractionMask = $04;
kCharSeparatorSpaceMask = $02;
kCharSeparatorNoBreakMask = $04;
kCharSeparatorTabMask = $08;
kCharSeparatorLineBreakMask = $10;
kCharSymbolOtherMask = $02;
kCharSymbolMathMask = $04;
kCharSymbolCurrencyMask = $08;
{ Prototypes for LocaleIdentifier functions }
FUNCTION CreateLocaleIdentifier(language: LocaleLanguageCode; region: LocaleRegionCode; customization: LocaleCustomizationCode): LocaleIdentifier; C;
FUNCTION GetLocaleLanguage(identifier: LocaleIdentifier): LocaleLanguageCode; C;
FUNCTION GetLocaleRegion(identifier: LocaleIdentifier): LocaleRegionCode; C;
FUNCTION GetLocaleCustomization(identifier: LocaleIdentifier): LocaleCustomizationCode; C;
{ Prototypes for TextEncoding functions }
FUNCTION CreateTextEncoding(encodingBase: TextEncodingBase; encodingVariant: TextEncodingVariant; encodingFormat: TextEncodingFormat): TextEncoding;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0615, $ABCE;
{$ENDC}
FUNCTION GetTextEncodingBase(encoding: TextEncoding): TextEncodingBase;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0216, $ABCE;
{$ENDC}
FUNCTION GetTextEncodingVariant(encoding: TextEncoding): TextEncodingVariant;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0217, $ABCE;
{$ENDC}
FUNCTION GetTextEncodingFormat(encoding: TextEncoding): TextEncodingFormat;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0218, $ABCE;
{$ENDC}
{$ENDC}
{$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE }
FUNCTION UpgradeScriptInfoToTextEncoding(textScriptID: ScriptCode; textLanguageID: LangCode; regionID: RegionCode; textFontname: Str255; VAR encoding: TextEncoding): OSStatus;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0710, $ABCE;
{$ENDC}
FUNCTION RevertTextEncodingToScriptInfo(encoding: TextEncoding; VAR textScriptID: ScriptCode; VAR textLanguageID: LangCode; VAR textFontname: Str255): OSStatus;
{$IFC NOT GENERATINGCFM}
INLINE $303C, $0811, $ABCE;
{$ENDC}
{$ENDC}
{$IFC FOR_SYSTEM8_COOPERATIVE }
FUNCTION UpgradeScriptInfoToLocaleIdentifier(script: ScriptCode; language: LangCode; region: RegionCode; fontName: Str255; VAR identifier: LocaleIdentifier): OSStatus; C;
FUNCTION RevertLocaleIdentifierToScriptInfo(identifier: LocaleIdentifier; VAR script: ScriptCode; VAR language: LangCode; VAR fontName: Str255): OSStatus; C;
{$ENDC}
{$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
TYPE
CharPropertyType = FourCharCode;
CONST
kCharPropertyTypeFlags = 'flag';
kCharPropertyTypeClass = 'clas';
kCharPropertyTypeGroup = 'grup';
kCharPropertyTypeDirection = 'dirc';
kCharPropertyTypeReorderPri = 'reor';
kCharPropertyTypeToken = 'tokn';
kCharPropertyTypeCtypes = 'ctyp';
TYPE
CharPropertyValue = UInt32;
FUNCTION GetCharacterProperties(charPtr: BytePtr; encoding: TextEncoding; propertyCount: ItemCount; VAR typeList: CharPropertyType; VAR valueList: CharPropertyValue): OSStatus; C;